package com.edu.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/*
 * @Author:princess
 * @Date 2023/11/27 11 27 18:57
 *
 */
@Data
public class User {
    @JsonIgnore
    private int userId;
    private String username;
    private String password;
    private String sex;
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date birthday;

    public User() {
    }

    public User(int userId, String username, String password, String sex, Date birthday) {
        this.userId = userId;
        this.username = username;
        this.password = password;
        this.sex = sex;
        this.birthday = birthday;
    }
}
